#include "PowerMaxProcessor.h"
#include "MainLayer.h"
#include "PowerMaxBuff.h"
#include "InputLayer.h"


PowerMaxProcessor::PowerMaxProcessor(void)
{
}


PowerMaxProcessor::~PowerMaxProcessor(void)
{
}

void PowerMaxProcessor::process( PlayerPlane* plane, MainLayer* mainLayer )
{
	PowerMaxBuff* buff = PowerMaxBuff::create();
	buff->setTimeMax(_time);
	buff->setPlane(plane);
	buff->setId(getId());

	mainLayer->getInputLayer()->getStateBar()->addBuff(buff);
}

void PowerMaxProcessor::parseXml( xml_node node )
{
	float time = node.child("Time").text().as_float();
	_time = time;
}
